<!DOCTYPE HTML>
<html>
<head>
<?php  session_start(); 
//print_r($_SESSION);exit;
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>UploadiFive Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="uploadify.css">
<style type="text/css">
body {
	font: 13px Arial, Helvetica, Sans-serif;
}
</style>

<style type="text/css">
    .uploadify-button {
        background-color: transparent;
        border: none;
        padding: 0;
    }
    .uploadify:hover .uploadify-button {
        background-color: transparent;
    }
</style>
</head>

<body>
	<h1>Uploadify Demo</h1>
	<form>
		<div id="queue"></div>
		<input id="file_upload" name="file_upload1" type="file" multiple="true">
	</form>

	<script type="text/javascript">
		<?php $timestamp = time();?>
		$(function() {
			$('#file_upload').uploadify({
				//'buttonClass' : 'uploadify-button',
				'buttonText' : '上传',
				// 'fileSizeLimit' : '100KB',
				 'fileTypeDesc' : 'Image Files',
				 'fileTypeExts' : '*.gif; *.jpg; *.png',
				// 'uploadLimit' : 2,
				// 'progressData' : 'speed',
				 'height'   : 20,
				 'width'    : 300,
				  'multi'    : false,
				//'debug'    : true,
				//'buttonImage' : '/template/default/admin/js/uploadify/browse-btn.png',
				'formData'     : {
					'timestamp' : '<?php echo $timestamp;?>',
					'isImg'		: 1,
					'token'     : '<?php echo md5('unique_salt' . $timestamp);?>',
					'<?php echo session_name();?>' : '<?php echo session_id();?>' 
				},
				'swf'      : 'uploadify.swf',
			//	'checkExisting' : 'check-exists.php',
				'uploader' : 'uploadify.php',
				'onUploadSuccess' : function(file, data, response) {
						console.log(file);
						console.log(data);
						//alert('The file was saved to: ' + data);
				 }
			});
		});
	</script>
</body>
</html>